let str = '';
for(var i=0;i<data.length;i++){
    str+=`<li>
    <a href="./goods.html?id=${data[i].proId}"
      ><img
        src="${data[i].proImg}"
        alt=""
    /></a>
    <p class="con-name">${data[i].proName}</p>
    <p class="con-pri"><span>¥</span><span>${data[i].price}</span></p>
  </li>`
}
let listObj = document.querySelector('#con-list');
listObj.innerHTML = str;

var userMsg = localStorage.getItem('userMsg')?JSON.parse(localStorage.getItem('userMsg')):{};
if(userMsg.isLogin==='ok'){
  $('#log').hide();
  $('#log1').show();
  $('#log1').find('span').html(userMsg.username);
}
$('quit').click(function(){
  localStorage.setItem('userMsg','');
  location.reload();
})

